package com.term.appadmin.pojo.request.company;

import com.term.appadmin.pojo.request.BaseRequest;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Created by chenGang on 2017/1/23.
 */
public class CompanyRequest extends BaseRequest {

    /**
     * 公司名称
     */
    @NotNull(message = "{appadmin.company.name.error}")
    @NotBlank(message = "{appadmin.company.name.error}")
    @Length(min = 1,max = 30,message = "{appadmin.company.name.length}")
    private String name;

    /**
     * 公司地址
     */
    @NotNull(message = "{appadmin.company.address.error}")
    @NotBlank(message = "{appadmin.company.address.error}")
    @Length(min = 1,max = 100,message = "{appadmin.company.address.length}")
    private String address;

    /**
     * 联系人
     */
    @NotNull(message = "{appadmin.company.contacts.error}")
    @NotBlank(message = "{appadmin.company.contacts.error}")
    @Length(min = 1,max = 30,message = "{appadmin.company.contacts.length}")
    private String contacts;

    /**
     * 手机号码
     */
    @NotNull(message = "{appadmin.company.mobile.error}")
    @NotBlank(message = "{appadmin.company.mobile.error}")
    @Pattern(regexp = "^[0-9]{11}$",message = "{appadmin.company.mobile.pattern}")
    private String mobile;

    /**
     * 传真
     */
    private String fax;

    /**
     * 邮箱
     */
    @NotNull(message = "{appadmin.company.email.error}")
    @NotBlank(message = "{appadmin.company.email.error}")
    @Email(message = "{appadmin.company.email.pattern}")
    private String email;

    /**
     * 备用联系方式
     */
    @NotNull(message = "{appadmin.company.link.error}")
    @NotBlank(message = "{appadmin.company.link.error}")
    @Pattern(regexp = "^[0-9]{11}$",message = "{appadmin.company.link.pattern}")
    private String link;

    /**
     * 备注
     */
    private String remark;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
